﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="lib/html5.js"></script>
    <script type="text/javascript" src="lib/respond.min.js"></script>
    <script type="text/javascript" src="lib/PIE_IE678.js"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="lib/Hui-iconfont/1.0.7/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="lib/icheck/icheck.css" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="static/h-ui.admin/css/style.css" />
    <!--[if IE 6]>
    <script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <!-- 权限验证 -->
    <script type="text/javascript" src="static/WebApi.js"></script>
    <title>审核列表</title>
</head>
<body>
    <nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 审核列表 <span class="c-gray en">&gt;</span> 审核列表详情 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a></nav>
    <div class="page-container">
        <div class="cl pd-5 bg-1 bk-gray mt-20">
            <span class="l">
                <input type="text" name="" id="number_Search" placeholder="请输入报告编号查询" style="width:250px" class="input-text">
                <button name="" id="" class="btn btn-success" type="button" onclick="search()"><i class="Hui-iconfont">&#xe665;</i> 查询</button>
            </span>
            <span class="r">当前数据：<strong id="count">&nbsp;</strong> 条，共<strong id="pagecount"></strong>页</span>
        </div>
        <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort">
                <thead>
                    <tr class="text-c">
                        <th width="80">项目号</th>
                        <th width="40">申请人</th>
                        <th width="40">勘察员</th>
                        <th width="40">估价员</th>
                        <th width="100">房屋坐落</th>
                        <th width="50">建筑面积(㎡)</th>
                        <th width="90">评估单价(元/㎡)</th>
                        <th width="90">评估总值(元)</th>
                        <th width="70">状态</th>
                        <th width="80">操作</th>
                    </tr>
                </thead>
                <tbody id="mybody">

                    <!--<tr class="text-c">
                        <td>201600001</td>
                        <td>张三</td>
                        <td>1356456456</td>
                        <td>王萨德</td>
                        <td>320㎡</td>
                        <td>150㎡</td>
                        <td>320K</td>
                        <td>评估完成</td>
                        <td class="f-14 td-manage">
                            <input type="button" class="btn btn-primary radius" value="初审" onclick="firstTrial()" />
                            <input type="button" class="btn btn-primary radius" value="终审" onclick="lastInstance()" />
                        </td>
                    </tr>

                    <tr class="text-c">
                        <td>201600002</td>
                        <td>李四</td>
                        <td>1356456456</td>
                        <td>王萨德</td>
                        <td>320㎡</td>
                        <td>150㎡</td>
                        <td>320K</td>
                        <td>正在评估</td>
                        <td class="f-14 td-manage">
                            <a title="导出抵押物初审意见书" href="javascript:;" onclick="Initia_laudit(201600002)" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe640;</i></a>
                            <a title="导出公积金贷款二手房担保方式正式报告" href="javascript:;" onclick="Formal_audit(201600001)" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6ba;</i></a>
                        </td>
                    </tr>-->
                    <!--<tr class="text-c">
                        <td>201600002</td>
                        <td>李四</td>
                        <td>1356456456</td>
                        <td>王萨德</td>
                        <td>320㎡</td>
                        <td>150㎡</td>
                        <td>320K</td>
                        <td>正在评估</td>
                        <td class="f-14 td-manage">
                            <a title="导出抵押物初审意见书" href="javascript:;" onclick="Initia_laudit(201600002)" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe640;</i></a>
                            <a title="导出公积金贷款二手房担保方式正式报告" href="javascript:;" onclick="Formal_audit(201600001)" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6ba;</i></a>
                        </td>
                    </tr>-->
                </tbody>
                <tfoot id="myfoot">

                </tfoot>
            </table>
        </div>
    </div>
    <!--模态框-->
    <script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
    <script type="text/javascript" src="lib/layer/2.1/layer.js"></script>
    <!--<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>-->
    <!-- <script type="text/javascript" src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>-->  <!--分页脚本，暂时注释-->
    <script type="text/javascript" src="static/h-ui/js/H-ui.js"></script>
    <script type="text/javascript" src="static/h-ui.admin/js/H-ui.admin.js"></script>
    <!--扩展js脚本-->
    <script type="text/javascript" src="static/Common.js"></script>
    <script type="text/javascript">
        /*估价信息-显示*/
        $(function () {
            Showdivisionmanagement("", 1, 10);//显示审核列表（根据报告编号查询）
        });
        //查询函数-根据报告编号
        function search() {
            var P_ReportNumber = $("#number_Search").val();
            Showdivisionmanagement(P_ReportNumber, 1, 10);//显示审核列表（根据报告编号查询）
        }

        //显示审核列表（根据报告编号查询）
        function Showdivisionmanagement(T_ReportNumber, pageindex, pagesize) {
            $.ajax({
                type: "post",
                url: ApiUrl + "api/trackRecord/examinationSelectPage",
                data: { search: T_ReportNumber, PageIndex: pageindex, PageSize: pagesize },
                success: function (data) {
                    $("#mybody").empty();
                    $("#myfoot").empty();
                    $("#count").text(data.TotalSize);
                    $("#pagecount").text(data.PageCount);
                    var html = Array("");
                    $(data.Result).each(function () {
                        html.push('<tr class="text-c">');
                        html.push('<td ><a class="btn btn-primary radius" data-title="勘查信息" _href="ExamineBase.html?' + this.T_ReportNumber + '" onclick="Hui_admin_tab(this)" href="javascript:;">' + this.T_ReportNumber + '</a></td>');
                        html.push('<td>' + this.T_Iid + '</td>');
                        html.push('<td>' + this.T_SiteSurveyidText + '</td>');
                        html.push('<td>' + this.T_ValuationName + '</td>');
                        html.push('<td>' + this.T_Located + '</td>');
                        if (this.T_Builtuparea == 0) {
                            html.push('<td></td>');
                        }
                        else {
                            html.push('<td>' + this.T_Builtuparea + '</td>');
                        }
                        if (this.T_ValuationPrice == null) {
                            html.push('<td></td>');
                        }
                        else {
                            html.push('<td>' + this.T_ValuationPrice + '</td>');
                        }
                        if (this.T_Valueofassessment == null) {
                            html.push('<td></td>');
                        }
                        else {
                            html.push('<td>' + this.T_Valueofassessment + '</td>');
                        }
                        html.push('<td>' + this.T_StateText + '</td>');
                        html.push('<td class="f-14 td-manage">');
                        if (this.T_State == 7) {

                        }
                        else if (this.T_State == 5) {
                            html.push('<input type="button" class="btn radius btn-primary" onClick="lastInstance(\'终审\', \'lastAudit.html\', \'' + this.T_ReportNumber + '\',\'800\', \'500\')" value="终审" />');
                        }
                        else if (this.T_State > 2) {
                            html.push('<input type="button" class="btn btn-primary radius" value="初审" onclick="firstTrial(\'初审\', \'firstAudit.html\', \'' + this.T_ReportNumber + '\',\'800\', \'500\')" />');
                            html.push('<input type="button" class="btn radius btn-primary" onClick="lastInstance(\'终审\', \'lastAudit.html\', \'' + this.T_ReportNumber + '\',\'800\', \'500\')" value="终审" />');
                        }
                        html.push('</td>');
                        html.push('</tr>');
                    });
                    $("#mybody").append(html.join(""));


                    var page = Array();
                    page.push('<tr><td style="text-align:right;" colspan="10">');
                    if (pageindex > 1 && data.PageCount > 0) {
                        page.push('<input type="button"  class="btn btn-primary radius" onclick="Showdivisionmanagement(\'' + T_ReportNumber + '\',' + (pageindex - 1) + ',' + pagesize + ')" value="上一页" />');
                    }
                    page.push('<lable  style="font-size:16px" ">第' + pageindex + '页</label>');
                    if (pageindex < data.PageCount && data.PageCount > 0) {
                        page.push('<input type="button"  class="btn btn-primary radius" onclick="Showdivisionmanagement(\'' + T_ReportNumber + '\',' + (pageindex + 1) + ',' + pagesize + ')" value="下一页" />');
                    }

                    page.push('</tr>');
                    var d1 = page.join("");
                    $("#myfoot").append(d1);

                }
            });
        };

        //根据页码显示列表
        function showByPage(i) {
            var index = $(i).val();
            if (/^[0-9]*[1-9][0-9]*$/.test(index)) {
                Showdivisionmanagement("", index, 10);//根据员工姓名获取员工信息
            }
            else {
                parent.layer.msg("请输入正整数跳转到该页，按回车确定", { icon: 2, time: 2000 });
            }
        }



        ///*导出抵押物初审意见书*/
        //function download_Initia_laudit(P_ReportNumber)
        //{
        //    $.ajax({
        //        url: ApiUrl + "api/Examination/Thetrial",
        //        type: 'post',
        //        data: { "": P_ReportNumber },
        //        success:function(data)
        //        {
        //            parent.layer.msg("导出成功！", { icon: 1, time: 1000 });
        //            location.href =""+ ApiUrl +data;
        //        },
        //        error:function()
        //        {
        //            parent.layer.msg("ajax执行生成文件时报错！", { icon: 2, time: 1000 });
        //        }
        //    });
        //    //location.href=''
        //}

        ///*导出公积金贷款二手房担保方式正式报告*/
        //function download_Formal_audit(P_ReportNumber) {
        //    $.ajax({
        //        url: ApiUrl + "api/Examination/lastAudit",
        //        type: 'post',
        //        data: { "": P_ReportNumber },
        //        success: function (data) {
        //            parent.layer.msg("导出成功！", { icon: 1, time: 1000 });
        //            location.href = "" + ApiUrl + data;
        //        },
        //        error: function () {
        //            parent.layer.msg("ajax执行生成文件时报错！", { icon: 2, time: 1000 });
        //        }
        //    });
        //    //location.href=''
        //}

        /*房产抵押基本信息-删除-未预约勘查信息之前可以删除*/
        function pledge_del(obj, id) {
            layer.confirm('确认要删除吗？', function (index) {
                $(obj).parents("tr").remove();
                layer.msg('已删除!', { icon: 1, time: 1000 });
            });
        }


        //弹出初审页面
        function firstTrial(title, url, id, w, h) {
            url = url + "?" + id;
            layer_show(title, url, w, h);
        }

        //弹出终审页面
        function lastInstance(title, url, id, w, h) {
            url = url + "?" + id;
            layer_show(title, url, w, h);
        }



    </script>
</body>
</html>




